<template>
	<div>
  <section class="order">
    <header class="header">
      <a class="header_title">
        <span class="header_title_text">订单列表</span>
      </a>
    </header>
    <section  v-if="!userInfo._id" class="order_no_login">
        <img src="./images/person.png">
        <h3>登录后查看外卖订单</h3>
      <button  @click="goto('/login')">立即登陆</button>
    </section>
  </section>
</div>
</template>

<script>
	import {mapState} from 'vuex'
	  export default {
	  	methods:{
	  		goto(path){
	  			 this.$router.push(path)
	  		}
	  	},
	  	  computed: {
    ...mapState(['userInfo'])
  },
	  }
</script>

<style lang="stylus" rel="stylesheet/stylus">
  @import "../../common/stylus/mixins.styl"
  .order  //订单
    width 100%
    .header //头部公共css
      background-color #b93228
      position fixed
      z-index 100
      left 0
      top 0
      width 100%
      height 45px
      .header_search
        position absolute
        left 15px
        top 50%
        transform translateY(-50%)
        width 10%
        height 50%
        .iconfont
          font-size 22px
          color #fff
      .header_title
        position absolute
        top 50%
        left 50%
        transform translate(-50%, -50%)
        width 30%
        color #fff
    .order_no_login
      padding-top 140px
      width 60%
      margin 0 auto
      text-align center
      >img
        display block
        width 100%
        height 30%
      >h3
        padding 10px 0
        font-size 17px
        color #6a6a6a
      >button
        display inline-block
        background #b93228
        font-size 14px
        color #fff
        border 0
        outline none
        border-radius 5px
        padding 10px 20px
</style>